package com.TeacherInfoServer.pojo.DTO;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
public class UpdateTemporaryPositionDTO {
    @NotNull(message = "id不能为null")
    private Integer id;
    @NotNull(message = "工号不能为null")
    @NotEmpty(message = "工号不能为空")
    @Size(min = 10, max = 10, message = "不是有效工号")
    private String teacherId;
    @NotNull(message = "挂职单位不能为null")
    @NotEmpty(message = "挂职单位不能为空")
    private String unit;
    @NotNull(message = "挂职描述不能为null")
    @NotEmpty(message = "挂职描述不能为空")
    private String description;
    @NotNull(message = "挂职起始时间不能为null")
    @NotEmpty(message = "挂职起始时间不能为空")
    @Pattern(regexp = "^\\d{4}-\\d{1,2}-\\d{1,2}",message = "日期不合法")
    private String startDate;
    @NotNull(message = "挂职结束时间不能为null")
    @NotEmpty(message = "挂职结束时间不能为空")
    @Pattern(regexp = "^\\d{4}-\\d{1,2}-\\d{1,2}",message = "日期不合法")
    private String endDate;
}
